package com.bytenerd.common.exception;

import com.bytenerd.common.base.BaseResponse;
import com.bytenerd.common.enums.ResponseCode;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(BizException.class)
    public BaseResponse BizException(ResponseCode responseCode){
        return new BaseResponse(responseCode);
    }
}
